const fs = require("fs");
const events = require("events");

const EventEmitter = new events.EventEmitter();

function getMime() {
    fs.readFile("./mime.json", function (err, data) {
        EventEmitter.emit("mimeData", data.toString());
    });
}

getMime();

EventEmitter.on("mimeData", function (data) {
    console.log(data);
});

